﻿using System;
using System.ComponentModel.DataAnnotations;
using XStudio.XCRF.Data.Business.Archieve;

namespace XStudio.XCRF.Data.Entities.CureInfo
{
    /// <summary>
    /// 中成药、中药注射液信息
    /// </summary>
    public partial class Inject : BaseEntity<Inject>, IArchieve
    {
        #region 属性
        /// <summary>
        /// 治疗信息ID
        /// </summary>
        [ForeignKey("CureInfo")]
        public Guid? CureInfoID { get; set; }
        /// <summary>
        /// 治疗信息
        /// </summary>
        public virtual CureInfo CureInfo { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [ArchieveField]
        [DataType(DataType.Date)]
        [Column(TypeName = "date")]
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [ArchieveField]
        [DataType(DataType.Date)]
        [Column(TypeName = "date")]
        public DateTime? EndTime { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [ArchieveField]
        [Column(TypeName = "varchar")]
        [MaxLength(100)]
        public string Remark { get; set; }
        #endregion 属性

        public Inject Clone()
        {
            Inject i = new Inject();
            i.Creater = this.Creater;
            i.CreaterID = this.CreaterID;
            i.CreateTime = this.CreateTime;
            i.CureInfo = this.CureInfo;
            i.CureInfoID = this.CureInfoID;
            i.EndTime = this.EndTime;
            i.IsDeleted = this.IsDeleted;
            i.LastModifier = this.LastModifier;
            i.LastModifierID = this.LastModifierID;
            i.LastModifyTime = this.LastModifyTime;
            i.Master = this.Master;
            i.MasterID = this.MasterID;
            i.Name = this.Name;
            i.Remark = this.Remark;
            i.StartTime = this.StartTime;
            return i;
        }
    }
}
